﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace MotionFramework.Editor
{
    [CustomEditor(typeof(UIKitWindowConfigSetting))]
    public class UIKitWindowConfigSettingInspector : UnityEditor.Editor
    {
        private SerializedProperty m_WindowPath;
        private void OnEnable()
        {
            m_WindowPath = serializedObject.FindProperty("m_WindowPath");
        }

        public override void OnInspectorGUI()
        {
            EditorGUILayout.LabelField("默认UIKit Windiw预制体路径：");
            EditorGUILayout.LabelField(m_WindowPath.stringValue);
            if (GUILayout.Button("选择路径", GUILayout.Width(140f)))
            {
                m_WindowPath.stringValue = EditorUtility.OpenFolderPanel("选择代码保存路径", Application.dataPath, "");
            }

            serializedObject.ApplyModifiedProperties();
        
        }
    }
}
